package com.gui.lock.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.gui.entity.Person;
import com.gui.lock.mapper.PersonMapper;
import com.gui.lock.service.PersonService;
import com.gui.utils.Sleeper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.concurrent.TimeUnit;

@Service
public class PersonServiceImpl implements PersonService {

    @Autowired
    private PersonMapper personMapper;

    @Override
    public List<Person> queryAllPerson(Person person) {
        Sleeper.sleep(TimeUnit.SECONDS, 10);
        Wrapper<Person> wrapper = new QueryWrapper<>();
        return personMapper.selectList(wrapper);
    }
}
